--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
scripts/ci/github-build-windows.sh b0d47b9ece2aac27f9b52d71eead961754287bf5 (b0d47b9e) Text, 1.53 KB
T8b949e#!/usr/bin/env bash
T8b949e# Build Windows portable + NSIS installers (electron-builder).
T8b949e#
T8b949e# When MESHCHATX_FRONTEND_PREBUILT=1 the script reuses the prebuilt
T8b949e# meshchatx/public/ artifact downloaded from the reusable Frontend build
T8b949e# workflow and only rebuilds the cx_Freeze backend. Otherwise it falls back to
T8b949e# the full pnpm dist:windows pipeline (frontend + docs + backend).
Tffa657set -euo pipefail
Te6edf3ROOTTff7b72=Ta5d6ff"Tff7b72$(Tffa657cd Ta5d6ff"Tff7b72$(dirname Ta5d6ff"Te6edf3$0Ta5d6ff"Tff7b72)Ta5d6ff/../..Ta5d6ff" Tff7b72&& Tffa657pwdTff7b72)Ta5d6ff"
Tffa657cd Ta5d6ff"Te6edf3$ROOTTa5d6ff"
git config --global core.longpaths Tffa657true T79c0ff2>/dev/null Tff7b72|| Tffa657true
Tff7b72if Tff7b72[Tff7b72[ Ta5d6ff"Tffd700${Te6edf3MESHCHATX_FRONTEND_PREBUILTTff7b72:-Te6edf30Tffd700}Ta5d6ff" Tff7b72=Tff7b72= Ta5d6ff"1" Tff7b72]Tff7b72]Tb4b4b4; Tff7b72then
Tff7b72if Tff7b72[Tff7b72[ ! -f Ta5d6ff"meshchatx/public/index.html" Tff7b72]Tff7b72]Tb4b4b4; Tff7b72then
Tffa657echo Ta5d6ff"MESHCHATX_FRONTEND_PREBUILT=1 but meshchatx/public/index.html is missing." >Tb4b4b4&T79c0ff2
Tffa657echo Ta5d6ff"Download the frontend artifact into meshchatx/public/ before invoking this script." >Tb4b4b4&T79c0ff2
Tffa657exit T79c0ff1
Tff7b72fi
pnpm run dist:windows-prebuilt
Tff7b72else
pnpm run dist:windows
Tff7b72fi
bash scripts/ci/github-prune-electron-dist-staging.sh
bash scripts/ci/github-verify-electron-dist.sh win
T8b949e# Ensure AppContainer/Landlock/Seccomp modules shipped in the frozen backend.
Tff7b72if Tff7b72[Tff7b72[ -d build/exe Tff7b72]Tff7b72]Tb4b4b4; Tff7b72then
bash scripts/ci/github-verify-frozen-sandbox.sh build/exe
bash scripts/ci/github-verify-frozen-runtime.sh build/exe
Tff7b72fi
T8b949e# Optional packaged smoke (manual / future CI job on a Windows runner):
T8b949e# MESHCHAT_APPCONTAINER=1 start the portable exe and assert
T8b949e# GET /api/v1/server/security reports appcontainer_active true.
T8b949e# Disable with MESHCHAT_APPCONTAINER=0 if LPAC DLL load fails on a given host.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────